<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <th:block th:include="include :: header('添加知识库类别')"/>
    </head>
    <body class="white-bg">
        <div class="wrapper wrapper-content animated fadeInRight ibox-content">
            <form class="form-horizontal m" id="form-category-edit" th:object="${category}">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">类别编号：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="codepk" id="codepk" th:field="*{codepk}" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">父类编号：</label>
                    <div class="col-sm-8">
                        <input id="codeparent" name="codeparent" class="form-control" th:field="*{codeparent}" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">类别名称：</label>
                    <div class="col-sm-8">
                        <input id="sortname" name="sortname" class="form-control" th:field="*{sortname}" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">层次：</label>
                    <div class="col-sm-8">
                        <input id="layernum" name="layernum" class="form-control" th:field="*{layernum}" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">显示排序：</label>
                    <div class="col-sm-8">
                        <input class="form-control" type="text" name="ordnum" th:field="*{ordnum}" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label is-refresh" title="是否结束">结束标记：
                        <i class="fa fa-question-circle-o"></i>
                    </label>
                    <div class="col-sm-3 is-refresh">
                        <div class="radio-box">
                            <input type="radio" id="endflag-no" name="endflag" value="1" th:field="*{endflag}">
                            <label for="endflag-no">否</label>
                        </div>
                        <div class="radio-box">
                            <input type="radio" id="endflag-yes" name="endflag" value="0" th:field="*{endflag}">
                            <label for="endflag-yes">是</label>
                        </div>
                    </div>
                </div>
                <div class="col-sm-offset-3">
                    <span class="help-block m-b-none" style="color: red;margin-left: 10px;">
                        <i class="fa fa-info-circle"></i>
                           填写说明：<br>
                                  a、此处修改由开发人员完成，请不要擅自修改；<br>
                                  b、“分类编号”：一但录入系统，不建议进行修改；<br>
                                  c、“显示排序”：对相同层次进行排序，建议采用有规律的数字；
                    </span>
                </div>
            </form>
        </div>
        <th:block th:include="include :: footer"/>
        <script>
            var prefix = ctx + "system/kbm/category";
            $("#form-kbmPoint-edit").validate({
                onkeyup: false,
                required: true,
                focusCleanup: true
            });

            function submitHandler() {
                if ($.validate.form()) {
                    $.operate.save(prefix + "/kbmCateEdit", $('#form-category-edit').serialize());
                }
            }

            function doSubmit(index, layero) {
                layer.close(index);
            }
        </script>
    </body>
</html>
